/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package logica;

import principal.Clientes;
import principal.ListaClientes;

/**
 *
 * @author Miguel
 */
public class buscCliente {

    public Boolean buscar(int ced, ListaClientes clts){
        Boolean resultado = Boolean.FALSE;

        for(Clientes aux: clts.getClientes())
            if(aux.getCedula() == ced)
                return resultado = Boolean.TRUE;

        return resultado;
    }

    public Clientes buscarClt(String login, String Password, ListaClientes clts){
        Clientes clt = null;

        for(Clientes aux: clts.getClientes())
            if(aux.getLogin().equals(login) && aux.getPassword().equals(Password))
                return aux;

        return clt;
    }

}
